package com.mall.b2c.bean;

import java.math.BigDecimal;

import org.apache.commons.lang3.StringUtils;

import com.mall.b2c.domain.member.PaymentDetailDomain;
import com.mall.b2c.util.DictionaryUtils;


public class PaymentDetailBean{

	private String paymentNo;// 流水号
	private BigDecimal amount;// 收支金额
	private BigDecimal balance;// 余额
	private String detailInfo;// 备注
	private String operator;//操作员
	private String dealId;//第三方支付平台支付编号
	private String paymentTypeName;//支付方式名称
	private String tradeNo;//交易编号
	
	public PaymentDetailBean(PaymentDetailDomain bean) {
		this.paymentNo = bean.getPaymentNo();
		this.amount = bean.getAmount();
		this.balance = bean.getBalance();
		this.detailInfo = DictionaryUtils.getEnumName(bean.getDetailType());
		if(StringUtils.isNotBlank(bean.getRemarks())){
			detailInfo = detailInfo + "-" + bean.getRemarks();
		}
		this.operator = bean.getOperator();
		this.dealId = bean.getDealId();
		this.paymentTypeName = bean.getPaymentTypeName();
		this.tradeNo = bean.getTradeNo();
	}
	
	public String getPaymentNo() {
		return paymentNo;
	}

	public void setPaymentNo(String paymentNo) {
		this.paymentNo = paymentNo;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getDetailInfo() {
		return detailInfo;
	}

	public void setDetailInfo(String detailInfo) {
		this.detailInfo = detailInfo;
	}

	public BigDecimal getBalance() {
		return balance;
	}

	public void setBalance(BigDecimal balance) {
		this.balance = balance;
	}

	public String getOperator() {
		return operator;
	}
	
	public void setOperator(String operator) {
		this.operator = operator;
	}

	public String getDealId() {
		return dealId;
	}

	public void setDealId(String dealId) {
		this.dealId = dealId;
	}

	public String getPaymentTypeName() {
		return paymentTypeName;
	}

	public void setPaymentTypeName(String paymentTypeName) {
		this.paymentTypeName = paymentTypeName;
	}

	public String getTradeNo() {
		return tradeNo;
	}

	public void setTradeNo(String tradeNo) {
		this.tradeNo = tradeNo;
	}
	
}
